import 'package:flutter/material.dart';
import 'package:flutter_juwo/ui/model/member_entity.dart';
import 'package:flutter_juwo/ui/pages/personalCenterPages/memberPage/tab_navigater.dart';

import 'generalVip.dart';
/**
 * @author nb
 * @function 新建的控制器
 * @创建日期 2019/5/24 15:54
 */
class NewControl extends StatefulWidget {
  @override
  NewControl({this.type, this.pageKey, this.data});

  final PageStorageKey<MarketTab> pageKey; //当前控件唯一标识Key
  final String type;
  final MemberDataViplist data;

  NewControlState createState() => new NewControlState();
}

class NewControlState extends State<NewControl> {
  //当控件插入控件树时触发，适合初始化变量
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
  return  General(widget.data);
/*    if (widget.type == 'general') {
      ///普通会员
      return General(widget.data);
    } else if (widget.type == 'vip') {
      return Container(
        ///尊贵VIP会员
        child: Text("尊贵VIP会员"),
      );
    }*/
    }

}
